<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>Tk_AddOption manual page - Library Procedures</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.6.11/Tk8.6.11 Documentation</a> <small>&gt;</small> <a href="contents.htm">Tk C API</a> <small>&gt;</small> AddOption</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl/Tk Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TkCmd/contents.htm">Tk Commands</A> | <A HREF="../ItclCmd/contents.htm">[incr Tcl] Package Commands</A> | <A HREF="../SqliteCmd/contents.htm">SQLite3 Package Commands</A> | <A HREF="../TdbcCmd/contents.htm">TDBC Package Commands</A> | <A HREF="../TdbcmysqlCmd/contents.htm">tdbc::mysql Package Commands</A> | <A HREF="../TdbcodbcCmd/contents.htm">tdbc::odbc Package Commands</A> | <A HREF="../TdbcpostgresCmd/contents.htm">tdbc::postgres Package Commands</A> | <A HREF="../TdbcsqliteCmd/contents.htm">tdbc::sqlite3 Package Commands</A> | <A HREF="../ThreadCmd/contents.htm">Thread Package Commands</A> | <A HREF="../TclLib/contents.htm">Tcl C API</A> | <A HREF="../TkLib/contents.htm">Tk C API</A> | <A HREF="../ItclLib/contents.htm">[incr Tcl] Package C API</A> | <A HREF="../TdbcLib/contents.htm">TDBC Package C API</A></H3>
<DL>
<DD><A HREF="AddOption.htm#M2" NAME="L7">NAME</A>
<DL><DD>Tk_AddOption &mdash; Add an option to the option database</DD></DL>
<DD><A HREF="AddOption.htm#M3" NAME="L8">SYNOPSIS</A>
<DL>
<DD><B>#include &lt;tk.h&gt;</B>
<DD>void
<DD><B>Tk_AddOption</B>(<I>tkwin, name, value, priority</I>)
</DL>
<DD><A HREF="AddOption.htm#M4" NAME="L9">ARGUMENTS</A>
<DL class="arguments">
</DL>
<DD><A HREF="AddOption.htm#M5" NAME="L10">DESCRIPTION</A>
<DL class="description">
<DD><A HREF="AddOption.htm#M6" NAME="L11">20</A>
<DD><A HREF="AddOption.htm#M7" NAME="L12">40</A>
<DD><A HREF="AddOption.htm#M8" NAME="L13">60</A>
<DD><A HREF="AddOption.htm#M9" NAME="L14">80</A>
</DL>
<DD><A HREF="AddOption.htm#M10" NAME="L15">KEYWORDS</A>
</DL>
<H3><A NAME="M2">NAME</A></H3>
Tk_AddOption &mdash; Add an option to the option database
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>#include &lt;tk.h&gt;</B><BR>
void<BR>
<B>Tk_AddOption</B>(<I>tkwin, name, value, priority</I>)<BR>
<H3><A NAME="M4">ARGUMENTS</A></H3>
<DL class="arguments">
<DT><A HREF="../TkLib/WindowId.htm">Tk_Window</A> <B>tkwin</B> (in)<DD>
Token for window.
<P><DT>const char <B>*name</B> (in)<DD>
Multi-element name of option.
<P><DT>const char <B>*value</B> (in)<DD>
Value of option.
<P><DT>int <B>priority</B> (in)<DD>
Overall priority level to use for option.
<P></DL>
<H3><A NAME="M5">DESCRIPTION</A></H3>
This procedure is invoked to add an option to the database
associated with <I>tkwin</I>'s main window.  <I>Name</I>
contains the option being specified and consists of names and/or
classes separated by asterisks or dots, in the usual X format.
<I>Value</I> contains the text string to associate with <I>name</I>;
this value will be returned in calls to <B><A HREF="../TkLib/GetOption.htm">Tk_GetOption</A></B>.
<I>Priority</I> specifies the priority of the value; when options are
queried using <B><A HREF="../TkLib/GetOption.htm">Tk_GetOption</A></B>, the value with the highest priority
is returned.  <I>Priority</I> must be between 0 and <B>TK_MAX_PRIO</B>.  Some
common priority values are:
<P>
<DL class="description">
<DT><A NAME="M6">20</A><DD>
Used for default values hard-coded into widgets.
<P><DT><A NAME="M7">40</A><DD>
Used for options specified in application-specific startup files.
<P><DT><A NAME="M8">60</A><DD>
Used for options specified in user-specific defaults files, such as
<B>.Xdefaults</B>, resource databases loaded into the X server, or
user-specific startup files.
<P><DT><A NAME="M9">80</A><DD>
Used for options specified interactively after the application starts
running.
<P></DL>
<H3><A NAME="M10">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#class">class</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/O.htm#option">option</A>, <A href="../Keywords/A.htm#add">add</A>
<div class="copy">Copyright &copy; 1998-2000 by Scriptics Corporation.
</div>
</BODY></HTML>
